package JAVATest;

import java.util.Scanner;

/**
 * ClassName:Text_016
 * Package:JAVATest
 * Description:
 *
 * @Author:ZhangXin
 * @Create2023/1/13-18:47
 * @Version:v1.0
 */
public class Text_016 {
    public static void main(String[] args) {
        int[] arr = getInts();
        int number1 = getNumber1(arr);
        System.out.println(number1);
    }

    private static int getNumber1(int[] arr) {
        for (int i = 0; i < arr.length; i++) {
            arr[i] = arr[i] + 5;
        }
        for (int i = 0; i < arr.length; i++) {
            arr[i] = arr[i] % 10;
        }
        for (int i = 0, j = arr.length-1; i <j; i++,j--) {
            int temp1 = arr[i];
            arr[i] = arr[j];
            arr[j] = temp1;
        }
        int number1=0;
        for (int i = 0; i < arr.length; i++) {
            number1 = number1 * 10 + arr[i];
        }
        return number1;
    }

    private static int[] getInts() {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入您要加密的密码:");
        int number = sc.nextInt();
        int temp = number;
        int count = 0;
        while (number != 0) {
            number = number / 10;
            count++;
        }
        int[] arr = new int[count];
        int index=arr.length-1;
        while(temp!=0){
            int num1 = temp % 10;
            temp = temp / 10;
            arr[index]=num1;
            index --;
        }
        return arr;
    }
}
